<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/js/date/skin/WdatePicker.css" type="text/css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/js/easyui/themes/icon.css">
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/easyui/easyui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/date/WdatePicker.js"></script>
<script type="text/javascript">
$(function(){
	$("#funDad").append("<option value='-1'>主菜单</option>");
	$.getJSON("rof_ajaxfunction.html?funDad=-1&time="+Math.random(),
		function(data){
		  $.each(data, function(i,item){
			   $("#funDad").append("<option value='"+item.funNo+"'>"+item.funName+"</option>");
	  	});
		 $("#funDad").val("<s:property value="functionBean.funDad"/>");
	}); 
	
});
</script>
</head>
<body >
 	<div class="easyui-panel" title="编辑面板" style="width:100%;" data-options="fit:true">
	<form id="sform" action="rof_savefunction.html" method="post" enctype="multipart/form-data">
		<table width="600" border="0" style="margin: 5px;">
			<tr><td height="25">主键 : </td></tr>
			<tr><td height="25"><input type="text" name="funNo" id="funNo" style="width: 320px;"  value="<s:property value="functionBean.funNo"/>"/></td></tr>
			<tr><td height="25">功能类型 : </td></tr>
			<tr><td height="25"><select name="funDad" id="funDad" style="width: 240px;" /></td></tr>
			<tr><td height="25">功能名称 : </td></tr>
			<tr><td height="25"><input type="text" name="funName" id="funName" style="width: 240px;"  value="<s:property value="functionBean.funName"/>"/></td></tr>
			<tr><td height="25">序号 : </td></tr>
			<tr><td height="25"><input type="text" name="funSeq" id="funSeq" value="<s:if test="functionBean.funSeq!=null"><s:text name="global.format.count"><s:param value="functionBean.funSeq"/></s:text></s:if>"/></td></tr>
			<tr><td height="25">链接地址 : </td></tr>
			<tr><td height="25"><input type="text" name="funRedirect" id="funRedirect" style="width: 480px;"  value="<s:property value="functionBean.funRedirect"/>"/></td></tr>
			<tr><td height="25">是否可用 : </td></tr>
			<tr><td height="25"><s:radio name="funEnable"  id="funEnable"  list="#{'1':'是','0':'否'}" listKey="key" listValue="value" value="functionBean.funEnable"/></td></tr>
			<tr><td height="25">选择一个图标 : 
						<img src="<%=request.getContextPath() %><s:property value="functionBean.funIcon"/>" id="icon"><input type="hidden" name="funIcon" id="funIcon" value="<s:property value="functionBean.funIcon"/>">
			</td></tr>
			<tr><td height="25">
					<table>
				    	<%for(int j=0;j<6;j++){ %>
				    	<tr>
				    	<%
				    		for(int i=j*20;i<(j*20+20);i++){
				    	%>
				    		<td><img border="0" src="<%=request.getContextPath() %>/image/icon/<%=i %>.jpg" onclick="$('#icon').attr('src','<%=request.getContextPath() %>/image/icon/<%=i %>.jpg');$('#funIcon').val('/image/icon/<%=i %>.jpg');"/></td>
				    	<%
				    		}
				    	%>    	
				    	</tr>
				    	<%
				    		}
				    	%>  
				    	</table>
			</td></tr>
			<tr><td height="25">状态 : </td></tr>
			<tr><td height="25"><s:radio name="funState"  id="funState"  list="#{'1':'正常','0':'停用'}" listKey="key" listValue="value" value="functionBean.funState"/></td></tr>
			<tr><td height="25">备注 : </td></tr>
			<tr><td height="25"><textarea name="funRemark" id="funRemark" ><s:property value="functionBean.funRemark"/></textarea></td></tr>
			<tr><td height="25"> </td></tr>

			<tr>
				<td height="25">
					<input type="button" class="submit" value="提交单据" onclick="sform.submit();"/>
					<input type="button" class="submit" value="返回" onclick="history.go(-1);"/>
				</td>
			</tr>
		</table>
	</form>
    </div>
</body>
</html>

